package com.lhd.entity.vo;
import java.util.ArrayList;
import java.util.List;
public class PaginationResultVO<T> {
	// 总查询结果数
	private Long resultCount;
	// 一页大小
	private Long pageSize;
	// 页号
	private Long pageNo;
	// 总共多少页
	private Long pageTotal;
	// 结果集
	private List<T> list = new ArrayList<>();

	public PaginationResultVO(Long resultCount, Long pageSize, Long pageNo, List<T> list) {
		this.resultCount = resultCount;
		this.pageSize = pageSize;
		this.pageNo = pageNo;
		this.list = list;
	}

    public PaginationResultVO(Long resultCount, Long pageSize, Long pageNo, Long pageTotal, List<T> list) {
        if (pageNo == 0) {
            pageNo = 1L;
        }
        this.resultCount = resultCount;
        this.pageSize = pageSize;
        this.pageNo = pageNo;
        this.pageTotal = pageTotal;
        this.list = list;
    }

	public PaginationResultVO(List<T> list) {
		this.list = list;
	}

	public PaginationResultVO() {

	}

	public Long getResultCount() {
		return resultCount;
	}

	public void setResultCount(Long resultCount) {
		this.resultCount = resultCount;
	}

	public Long getPageSize() {
		return pageSize;
	}

	public void setPageSize(Long pageSize) {
		this.pageSize = pageSize;
	}

	public Long getPageNo() {
		return pageNo;
	}

	public void setPageNo(Long pageNo) {
		this.pageNo = pageNo;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}

	public Long getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(Long pageTotal) {
        this.pageTotal = pageTotal;
    }
}
